package test_model_base;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.servlet.model.base.Sector;

public class SectorTest extends TestCase {
	private Sector sector;
	
	@Before
	public void setUp() throws Exception {
		super.setUp();
		sector = new Sector("Construction", true);
	}

	@After
	public void tearDown() throws Exception {
		sector = null;
	}

	@Test
	public void testSector() {
		sector = new Sector();
		Assert.assertEquals("Autre", sector.getSectorBase());
		Assert.assertEquals(26, sector.getSector());
	}

	@Test
	public void testSectorStringBoolean() {
		sector = new Sector("Information et communication", false);
		Assert.assertEquals("Information et communication", sector.getSectorBase());
		Assert.assertEquals(13, sector.getSector());
	}

	@Test
	public void testSetSectorVisu() {
		sector.setSectorVisu("Information et communication");
		Assert.assertEquals(13, sector.getSector());

	}

	@Test
	public void testGetSector() {
		Assert.assertEquals(9, sector.getSector());
	}

	@Test
	public void testGetSectorBase() {
		Assert.assertEquals("Construction", sector.getSectorBase());
	}

}
